Integrand size = 23, antiderivative size = 133 \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {\sqrt {b} (3 a+2 b) \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{2 (a-b)^{7/2} f}-\frac {(a+b) \cos (e+f x)}{(a-b)^3 f}+\frac {\cos ^3(e+f x)}{3 (a-b)^2 f}-\frac {a b \sec (e+f x)}{2 (a-b)^3 f \left (a-b+b \sec ^2(e+f x)\right )} \]
[Out]
Time = 0.26 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3745, 467, 1275, 211} \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {\sqrt {b} (3 a+2 b) \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{2 f (a-b)^{7/2}}+\frac {\cos ^3(e+f x)}{3 f (a-b)^2}-\frac {(a+b) \cos (e+f x)}{f (a-b)^3}-\frac {a b \sec (e+f x)}{2 f (a-b)^3 \left (a+b \sec ^2(e+f x)-b\right )} \]
[In]
[Out]
Rule 211
Rule 467
Rule 1275
Rule 3745
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {-1+x^2}{x^4 \left (a-b+b x^2\right )^2} \, dx,x,\sec (e+f x)\right )}{f} \\ & = -\frac {a b \sec (e+f x)}{2 (a-b)^3 f \left (a-b+b \sec ^2(e+f x)\right )}-\frac {b \text {Subst}\left (\int \frac {\frac {2}{(a-b) b}-\frac {2 a x^2}{(a-b)^2 b}+\frac {a x^4}{(a-b)^3}}{x^4 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{2 f} \\ & = -\frac {a b \sec (e+f x)}{2 (a-b)^3 f \left (a-b+b \sec ^2(e+f x)\right )}-\frac {b \text {Subst}\left (\int \left (\frac {2}{(a-b)^2 b x^4}+\frac {2 (a+b)}{b (-a+b)^3 x^2}+\frac {3 a+2 b}{(a-b)^3 \left (a-b+b x^2\right )}\right ) \, dx,x,\sec (e+f x)\right )}{2 f} \\ & = -\frac {(a+b) \cos (e+f x)}{(a-b)^3 f}+\frac {\cos ^3(e+f x)}{3 (a-b)^2 f}-\frac {a b \sec (e+f x)}{2 (a-b)^3 f \left (a-b+b \sec ^2(e+f x)\right )}-\frac {(b (3 a+2 b)) \text {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{2 (a-b)^3 f} \\ & = -\frac {\sqrt {b} (3 a+2 b) \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{2 (a-b)^{7/2} f}-\frac {(a+b) \cos (e+f x)}{(a-b)^3 f}+\frac {\cos ^3(e+f x)}{3 (a-b)^2 f}-\frac {a b \sec (e+f x)}{2 (a-b)^3 f \left (a-b+b \sec ^2(e+f x)\right )} \\ \end{align*}
Time = 4.19 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.37 \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\frac {6 \sqrt {b} (3 a+2 b) \arctan \left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{(a-b)^{7/2}}+\frac {6 \sqrt {b} (3 a+2 b) \arctan \left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{(a-b)^{7/2}}-\frac {\cos (e+f x) \left (9 a+15 b+\frac {12 a b}{a+b+(a-b) \cos (2 (e+f x))}\right )+(-a+b) \cos (3 (e+f x))}{(a-b)^3}}{12 f} \]
[In]
[Out]
Time = 7.74 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.14
method | result | size |
derivativedivides | \(\frac {\frac {\frac {a \cos \left (f x +e \right )^{3}}{3}-\frac {b \cos \left (f x +e \right )^{3}}{3}-\cos \left (f x +e \right ) a -b \cos \left (f x +e \right )}{\left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )}+\frac {b \left (-\frac {a \cos \left (f x +e \right )}{2 \left (a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b \right )}+\frac {\left (3 a +2 b \right ) \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{2 \sqrt {b \left (a -b \right )}}\right )}{\left (a -b \right )^{3}}}{f}\) | \(152\) |
default | \(\frac {\frac {\frac {a \cos \left (f x +e \right )^{3}}{3}-\frac {b \cos \left (f x +e \right )^{3}}{3}-\cos \left (f x +e \right ) a -b \cos \left (f x +e \right )}{\left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )}+\frac {b \left (-\frac {a \cos \left (f x +e \right )}{2 \left (a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b \right )}+\frac {\left (3 a +2 b \right ) \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{2 \sqrt {b \left (a -b \right )}}\right )}{\left (a -b \right )^{3}}}{f}\) | \(152\) |
risch | \(\frac {{\mathrm e}^{3 i \left (f x +e \right )}}{24 \left (a^{2}-2 a b +b^{2}\right ) f}-\frac {3 \,{\mathrm e}^{i \left (f x +e \right )} a}{8 f \left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )}-\frac {5 \,{\mathrm e}^{i \left (f x +e \right )} b}{8 f \left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )}-\frac {3 \,{\mathrm e}^{-i \left (f x +e \right )} a}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) f}-\frac {5 \,{\mathrm e}^{-i \left (f x +e \right )} b}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) f}+\frac {{\mathrm e}^{-3 i \left (f x +e \right )}}{24 \left (a^{2}-2 a b +b^{2}\right ) f}-\frac {a b \left ({\mathrm e}^{3 i \left (f x +e \right )}+{\mathrm e}^{i \left (f x +e \right )}\right )}{f \left (a -b \right )^{3} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )}+\frac {3 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) a}{4 \left (a -b \right )^{4} f}+\frac {i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) b}{2 \left (a -b \right )^{4} f}-\frac {3 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) a}{4 \left (a -b \right )^{4} f}-\frac {i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right ) b}{2 \left (a -b \right )^{4} f}\) | \(541\) |
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 456, normalized size of antiderivative = 3.43 \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\left [\frac {4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{5} - 4 \, {\left (3 \, a^{2} - a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left ({\left (3 \, a^{2} - a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 3 \, a b + 2 \, b^{2}\right )} \sqrt {-\frac {b}{a - b}} \log \left (-\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} - 2 \, {\left (a - b\right )} \sqrt {-\frac {b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) - 6 \, {\left (3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )}{12 \, {\left ({\left (a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} b - 3 \, a^{2} b^{2} + 3 \, a b^{3} - b^{4}\right )} f\right )}}, \frac {2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{5} - 2 \, {\left (3 \, a^{2} - a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left ({\left (3 \, a^{2} - a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 3 \, a b + 2 \, b^{2}\right )} \sqrt {\frac {b}{a - b}} \arctan \left (-\frac {{\left (a - b\right )} \sqrt {\frac {b}{a - b}} \cos \left (f x + e\right )}{b}\right ) - 3 \, {\left (3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )}{6 \, {\left ({\left (a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} b - 3 \, a^{2} b^{2} + 3 \, a b^{3} - b^{4}\right )} f\right )}}\right ] \]
[In]
[Out]
Timed out. \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\text {Timed out} \]
[In]
[Out]
Exception generated. \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 354 vs. \(2 (119) = 238\).
Time = 0.64 (sec) , antiderivative size = 354, normalized size of antiderivative = 2.66 \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {a^{4} f^{11} \cos \left (f x + e\right )^{3} - 4 \, a^{3} b f^{11} \cos \left (f x + e\right )^{3} + 6 \, a^{2} b^{2} f^{11} \cos \left (f x + e\right )^{3} - 4 \, a b^{3} f^{11} \cos \left (f x + e\right )^{3} + b^{4} f^{11} \cos \left (f x + e\right )^{3} - 3 \, a^{4} f^{11} \cos \left (f x + e\right ) + 6 \, a^{3} b f^{11} \cos \left (f x + e\right ) - 6 \, a b^{3} f^{11} \cos \left (f x + e\right ) + 3 \, b^{4} f^{11} \cos \left (f x + e\right )}{3 \, {\left (a^{6} f^{12} - 6 \, a^{5} b f^{12} + 15 \, a^{4} b^{2} f^{12} - 20 \, a^{3} b^{3} f^{12} + 15 \, a^{2} b^{4} f^{12} - 6 \, a b^{5} f^{12} + b^{6} f^{12}\right )}} - \frac {a b \cos \left (f x + e\right )}{2 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b\right )} f} + \frac {{\left (3 \, a b + 2 \, b^{2}\right )} \arctan \left (\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt {a b - b^{2}}}\right )}{2 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \sqrt {a b - b^{2}} f} \]
[In]
[Out]
Time = 13.95 (sec) , antiderivative size = 737, normalized size of antiderivative = 5.54 \[ \int \frac {\sin ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {\sqrt {b}\,\left (3\,a+2\,b\right )\,\left (24\,a^9\,b-128\,a^8\,b^2+264\,a^7\,b^3-240\,a^6\,b^4+40\,a^5\,b^5+96\,a^4\,b^6-72\,a^3\,b^7+16\,a^2\,b^8\right )}{4\,a\,{\left (a-b\right )}^{13/2}}+\frac {\sqrt {b}\,\left (a-2\,b\right )\,{\left (3\,a+2\,b\right )}^2\,\left (16\,a^{12}-176\,a^{11}\,b+864\,a^{10}\,b^2-2496\,a^9\,b^3+4704\,a^8\,b^4-6048\,a^7\,b^5+5376\,a^6\,b^6-3264\,a^5\,b^7+1296\,a^4\,b^8-304\,a^3\,b^9+32\,a^2\,b^{10}\right )}{32\,a\,{\left (a-b\right )}^{21/2}}\right )+\frac {\sqrt {b}\,\left (a-2\,b\right )\,{\left (3\,a+2\,b\right )}^2\,\left (-16\,a^{12}+144\,a^{11}\,b-576\,a^{10}\,b^2+1344\,a^9\,b^3-2016\,a^8\,b^4+2016\,a^7\,b^5-1344\,a^6\,b^6+576\,a^5\,b^7-144\,a^4\,b^8+16\,a^3\,b^9\right )}{32\,a\,{\left (a-b\right )}^{21/2}}\right )\,{\left (a-b\right )}^7}{-9\,a^{10}\,b+42\,a^9\,b^2-67\,a^8\,b^3+24\,a^7\,b^4+45\,a^6\,b^5-46\,a^5\,b^6+3\,a^4\,b^7+12\,a^3\,b^8-4\,a^2\,b^9}\right )\,\left (3\,a+2\,b\right )}{2\,f\,{\left (a-b\right )}^{7/2}}-\frac {\frac {4\,a^2+11\,b\,a}{3\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (2\,b^2+3\,a\,b\right )}{\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}+\frac {2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (2\,a^2-3\,a\,b+11\,b^2\right )}{\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}+\frac {2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (2\,a^2+9\,a\,b+19\,b^2\right )}{3\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}+\frac {2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (-10\,a^2+22\,a\,b+33\,b^2\right )}{3\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+\left (a+4\,b\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+\left (12\,b-2\,a\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+\left (12\,b-2\,a\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+\left (a+4\,b\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\right )} \]
[In]
[Out]